package com.bub.pay.framework.common.template;

import java.util.HashMap;
import java.util.Map;

public class SmsTemplate {

	public static final Map<String, String> temMap = new HashMap<String, String>();

	public static final String KEY_PASSWORD = "1001";
	public static final String KEY_PAYPASS = "1002";
	public static final String KEY_MERCHANT_APPROVAL = "1003";

	private final static String T_RESET_PASSWORD = "【%s】您的平台账号：{$var}，登录密码已重置为：{$var}，登录后请尽快修改。如非本人操作，请联系官方客服！";

	private final static String T_RESET_PASSPASS = "【%s】您的平台账号：{$var}，支付密码已清空，登录后请重新设置。如非本人操作，请联系官方客服！";

	private final static String T_MERCHANT_APPROVAL = "【彩盟】您已在平台成功开户，请前往邮箱查看账号和密码。如收件箱中查看不到，请查看一下垃圾邮件。";

	static {
		temMap.put(KEY_PASSWORD, T_RESET_PASSWORD);
		temMap.put(KEY_PAYPASS, T_RESET_PASSPASS);
		temMap.put(KEY_MERCHANT_APPROVAL, T_MERCHANT_APPROVAL);
	}

	public static void main(String[] args) {
		System.out.println(String.format(T_MERCHANT_APPROVAL, ""));
	}

	public static String getContent(String templateId, String sign) {
		if (temMap != null && temMap.containsKey(templateId)) {
			String content = temMap.get(templateId);
			return String.format(content, sign);
		}
		return "";
	}

}
